package tor;

import java.io.File;
import java.io.IOException;

import org.silvertunnel.netlib.layer.tor.TorHiddenServicePrivateNetAddress;
import org.silvertunnel.netlib.layer.tor.TorNetLayerUtil;



public class Serv {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
	    // create new private+public hidden service key
	    TorNetLayerUtil torNetLayerUtil = TorNetLayerUtil.getInstance();
	    TorHiddenServicePrivateNetAddress newNetAddress = torNetLayerUtil.createNewTorHiddenServicePrivateNetAddress();

	    // write new private+public hidden service key to directory
	    File directory = new File("D:/keys/"); 
	    directory.mkdir();
	    torNetLayerUtil.writeTorHiddenServicePrivateNetAddressToFiles(directory, newNetAddress);
	}
}
	
